<?php
require_once('db.php');
require_once('config.php');

$db = new XE_DB;
$sql = 'oo_dms.sql';
$query = file_get_contents($sql);
?>

<head>
  <title>oo_tweet_tools: install</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8;" />
</head>
<body>
<h1>Welcome</h1>
<h4>Create Table Query:</h4>
<?php
    echo '<pre>'.$query.'</pre>';
    echo '<h4>Result:</h4>';
    echo '<p>';

    $result = $db->execute_query($query);
    $exist_table = $db->mysql_is_table($table);

    if ($exist_table) {
	echo 'created tables successfully.<br/>';
	echo '<br/>';
	echo '<a href="view_dms.php">go to back</a>';
    } else {
	echo '<strong>ERROR</strong>. try again. press F5';
    }

    echo '</p>';
?>
<div id="footer">
<address>powered by <a href='#'>oo_tweet for PHP</a></address>
</div>
</body>

</html>
